/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package demo.access;

/**
 *
 * @author VANDH
 */
// Super class
public abstract class Vehicle {

    public Vehicle(String name, String manufacturer) {
        this.name = name;
        this.manufacturer = manufacturer;
    }

    public Vehicle() {
    }
    protected String color;

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
    protected String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getManufacturer() {
        return manufacturer;
    }

    public void setManufacturer(String manufacturer) {
        this.manufacturer = manufacturer;
    }

    public float getVolume() {
        return volume;
    }

    public void setVolume(float volume) {
        this.volume = volume;
    }

    public int getWheelCount() {
        return wheelCount;
    }

    public void setWheelCount(int wheelCount) {
        this.wheelCount = wheelCount;
    }

    public int getGear() {
        return gear;
    }

    public void setGear(int gear) {
        this.gear = gear;
    }
    protected String manufacturer;
    protected float volume;
    protected int wheelCount;
    protected int gear;

    public void start() {
        System.out.println("Starting...");
    }

    public void accelerator() {
        System.out.println("OK, I'm going");
    }

    public void changeGear() {
        gear++;

        gear = gear % 5;
        System.out.println("Current gear : " + gear);
    }

    // khai báo showSound là method trừu tượng
    // tất cả class con kế thừa đều phải viết code phương thức này
    public abstract void showSound();
}
